import Vue from 'vue'
import Router from 'vue-router'

import home from '@/view/home'
import none from '@/view/none'
import menu_vue from './menus/vue'
import menu_css from './menus/css'
import menu_js from './menus/javascript'

Vue.use(Router);

export default new Router({
	routes: [
		{
			path: '/', component: home,
			children: [
				{
					path: '/vuejs', name: 'vuejs', component: none,
					children: menu_vue
				},
				{
					path: '/js', name: 'javaScript', component: none,
					children: menu_js
				},
				{
					path: '/css', name: 'css', component: none,
					children: menu_css
				}
			]
		},
		{
			path: '/home', component: home,
			children: [
				{ path: '/index', name: '首页', component: () => import('@/view/index') }
			]
		},
		{
			path: '/', redirect: '/index'
		}
	]
})
